package com.ywk.pattern._15_abstractfactory._15_9;

import java.io.*;
import java.util.Properties;

public class PropertiesUtil {
    public static Properties properties = null;

    static {

        InputStream is = null;
        try {
            is = PropertiesUtil.class.getResourceAsStream("dao.properties");
            properties = new Properties();
            properties.load(is);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String key) {
        return properties.getProperty(key);
    }
}
